package com.smh.aiagent.demo.invoke;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author shiminghui
 * @date 2025/5/29 21:06
 * @description: TODO
 */
@Component
public class OllamaAiInvoke implements CommandLineRunner { // 实现 CommandLineRunner 接口，在应用程序启动时执行代码

//    @Resource(name = "ollamaChatModel")
//    private ChatModel ollamaChatModel;


    @Override
    public void run(String... args) throws Exception {
//        ChatResponse chatResponse = ollamaChatModel.call(new Prompt(new SystemMessage("你只会说好"), new UserMessage("你好")));
//        chatResponse.getResults().forEach(result -> {
//            System.out.println(result.getOutput().getText());
//        });
    }
}
